class BuyOrder:
    def __init__(self, *args, **kwargs):
        self.id = kwargs.get('id', 0)
        self.supplier = kwargs.get('supplier')
        self.buy_date_time = kwargs.get('buy_date_time')
        self.digest = kwargs.get('digest')
        self.amount = kwargs.get('amount', 1)
        self.price = kwargs.get('price', 0.0)
        self.unit = kwargs.get('unit', '单')
        self.is_payed = kwargs.get('is_payed', False)
        self.is_recv_invoice = kwargs.get('is_recv_invoice', False)
        self.is_take_delivery = kwargs.get('is_take_delivery', False)

    def __str__(self):
        return (f'BuyOrder<id:{self.id}, supplier:{self.supplier}, buy_date_time:{self.buy_date_time}, '
                f'digest:{self.digest}, amount:{self.amount}, price:{self.price}, unit:{self.unit}, '
                f'is_payed:{self.is_payed}, is_recv_invoice:{self.is_recv_invoice}, '
                f'is_take_delivery:{self.is_take_delivery}>')
